package com.fullertontech.framework.jdbc;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
import com.fullertontech.framework.global.GlobalUtils;

public class MybatisPlusPluginCondition implements Condition{

	@Override
	public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
		EnableJDBC enableJDBC=GlobalUtils.getAnnotation(EnableJDBC.class);
		if(PluginType.MYBATISPLUS.equals(enableJDBC.plugin())) {
			return true;
		}
		return false;
	}
}

